package com.loong.life.common.backend.param;

import com.loong.common.validator.group.CommonInsert;
import com.loong.common.validator.group.CommonUpdate;
import lombok.*;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;

@Builder
@Setter
@Getter
@AllArgsConstructor
@NoArgsConstructor
public class AgentProductParam {

    /**
     *产品id
     */
    @NotNull(message = "更新时产品id不能为空",groups = {CommonUpdate.class})
    private Long id;

    /**
     * 代理商id
     */
    @NotNull(message = "新增时代理商id不能为空",groups = {CommonInsert.class})
    private Long agentId;

    /**
     * 产品类型(0话费,1流量,2短信)
     */
    @NotNull(message = "新增时产品类型不能为空",groups = {CommonInsert.class})
    private Integer productType;

    /**
     * 产品名称
     */
    @NotBlank(message = "新增时产品名称不能为空",groups = {CommonInsert.class})
    private String productCode;

    /**
     * 原价
     */
    @NotNull(message = "新增时产品原价不能为空",groups = {CommonInsert.class})
    private BigDecimal originPrice;

    /**
     * 优惠价
     */
    @NotNull(message = "新增时产品优惠价不能为空",groups = {CommonInsert.class})
    private BigDecimal discountPrice;

    /**
     * 库存
     */
    @NotNull(message = "新增时产品库存不能为空",groups = {CommonInsert.class})
    private Integer inventory;

    /**
     * 状态(1销售中,2已售罄,3未开售,4下架,5商品属性已更改)
     */
    private Integer status;

    /**
     * 备注
     */
    private String remark;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 更新时间
     */
    private Date lastUpdateTime;
}